/*
 *  $Id: Weights.cs 1047 2010-05-18 12:44:14Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008-2009 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima {
    /// <summary>
    /// Коэффициенты весов для различных параметров.
    /// Собраны вместе для упрощения их правки.
    /// </summary>
    public static class WeightCoeff {
        public const int Damage = 20;
        public const int Health = 20;
        public const int CardMaxCount = 50;
        public const int AllowOffenceCast = 200;
        public const int AllowDefenceCast = 100;
        public const int AllowTappedCast = 20;
        public const int NoTapAfterCast = 50;

        public const int AdditionalElement = 100;
        public const int AdditionalEnemyElement = 250;

        public static readonly RelationWeights ManaCost = new RelationWeights(-20, -50, -30);
        public static readonly RelationWeights HealthCost = new RelationWeights(-30, -80, -50);
        public const int Meditation = -80;
        public static readonly RelationWeights DemonPactCost = new RelationWeights(-10, -30, -20);

        public const int SummonAsTapped = -50;
        public const int SummonAsUntapped = 50;

        public const int AffectEnemyPercent = 200;
        public const int AffectOtherPercent = 150;

        public class RelationWeights {
            private int[] _data;

            public RelationWeights(int self, int enemy, int other) {
                _data = new int[] {self, enemy, other};
            }

            public int GetWeight(ElementRelation relation) {
                return _data[(int) relation];
            }
        }
    }
}
